package com.xianyun.book.api;

import com.alibaba.cola.dto.Response;
import com.alibaba.cola.dto.SingleResponse;
import com.xianyun.book.dto.BookIdleRefreshCmd;
import com.xianyun.book.dto.BookPurchaseCmd;
import com.xianyun.book.dto.BookSellAddCmd;

/**
 * @author ytt
 */
public interface OrderServiceI {

    /**
     * 发布闲置
     * @param sellAddCmd 闲置书籍
     * @return 响应结果
     */
    Response postIdle(BookSellAddCmd sellAddCmd);

    /**
     * 更新闲置
     * @param idlePostCmd 闲置书籍
     * @return 响应结果
     */
    Response refreshIdle(BookIdleRefreshCmd idlePostCmd);

    /**
     * 购买书籍
     * @param purchaseCmd 购买信息
     * @return 响应结果
     */
    SingleResponse<String> purchaseBook(BookPurchaseCmd purchaseCmd);
}
